package com.escool.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.escool.dao.GradosDAO;
import com.escool.dao.SeccionesDAO;
import com.escool.model.TbGrado;
@Service
public class GradosServiceImpl implements GradosService {
	
	@Autowired
	GradosDAO gradosDAO;

	@Transactional
	public void addGrados(TbGrado grados) {
		gradosDAO.addGrados(grados);

	}

	@Transactional
	public void updateGrados(TbGrado grados) {
		gradosDAO.updateGrados(grados);

	}

	@Transactional
	public List<TbGrado> listGrados() {
		
		return gradosDAO.listGrados();
	}

	@Transactional
	public void removeGrados(Integer id) {
		gradosDAO.deleteGrados(id);

	}

	@Transactional
	public TbGrado findGrado(Integer id) {
		
		return gradosDAO.findGrado(id);
	}

}
